package cc.sheji.reposity;

import cc.sheji.domain.InvitationList;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface InvitationListRepository extends CrudRepository<InvitationList, Long> , JpaSpecificationExecutor<InvitationList> {


    @Query("select  sum(award)  from InvitationList where  invitationUser = :userId ")
    long awardTotal(@Param("userId") Long userId);
}
